package com.example.yuejian21.nongfusanquan.yuejian21.service;

import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Commentbean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.MeBean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Myactivitybean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Orderbean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.UserCollectclubbean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Userbean;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Userinfo;
import com.example.yuejian21.nongfusanquan.yuejian21.javabean.Userpostbean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by Nongfusanquan on 2017-10-10.
 */

public interface UserService {
    @GET("User/login/")
    Call<Userbean> getuserLogin(
            @Query("u_name") String username,//服务器端的格式
            @Query("u_pass") String password
    );


    @GET("User/reg/")
    Call<Commentbean> reg(
            @Query("u_name") String username,
            @Query("u_pass") String password,
           @Query("u_phone") String u_phone



    );
    @GET("User/getUserInfo/")
    Call<Userinfo> getUser(
            @Query("u_id") String user_id);

    @GET("User/edituser")
    Call<MeBean> edituser(@Query("u_id") int u_id
    );

    //修改个人信息
    @GET("User/updateuser")
    Call<MeBean> updateuser(@Query("u_id") int u_id,
                              @Query("u_name") String u_name,
                              @Query("u_pass") String u_pass,
                              @Query("u_phone") String u_phone

    );

    //3.用户信息
    @GET("User/getUserInfo")
    Call<Userbean> getUserInfo(@Query("u_id") int u_id);


    @GET("User/getMyTrainOrderlist")
    Call<List<Orderbean>> getMyTrainOrderlist(@Query("u_id") int u_id
    );


    @GET("User/getAllClubAttention")
    Call<List<UserCollectclubbean>> getMyCollectlist(@Query("user_id") int u_id
            );

    @GET("User/getMypost")
    Call<List<Userpostbean>> getMypost(@Query("u_id") int u_id
    );

    @GET("User/getMyActOrderlist")
    Call<List<Myactivitybean>> getMyActOrderlist(@Query("u_id") int u_id
    );

}

